// src/stores/userStore.js
import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserStore = defineStore('user', () => {
  const currentUser = ref(null)
  
  const login = (username) => {
    currentUser.value = username
  }
  
  const logout = () => {
    currentUser.value = null
  }
  
  return { currentUser, login, logout }
})